package com.foreknow.mapping;

import com.foreknow.model.User;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserMapping implements EntityMapping {


  @Override
  public Object mapping(ResultSet rs) throws SQLException {
    User user = new User();
    user.setId(rs.getInt("id"));
    user.setUsername(rs.getString("username"));
    user.setPassword(rs.getString("password"));
    return user;
  }
}
